#include<iostream>
using namespace std;
int year, month, date, ans;
int exam5_4()
{
	int a[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
	cin >> year >> month >> date;
	for (int i = 1; i < month; i++)ans += a[i];
	ans += date;
	if (year % 4 == 0 and year % 100 != 0 or year % 400 == 0)
		if (month > 2)ans++;
	cout << ans;
	return 0;
}